<?php

/**
 * @author shuang
 * @date 2016-11-3 13:57:29
 */
use yii\helpers\Url;
use common\components\MTools;

$this->title = "提现";
?>
<div class="content native-scroll">
    <div class="buttons-tab">
        <a href="#tab-cash" class="tab-link button active">提现</a>
        <a href="#tab-history" class="tab-link button">提现记录</a>
    </div>
    <div class="tabs">
        <div class="tab active" id="tab-cash">
            <div class="list-block media-list">
                <ul>
                    <li class="item-content">
                        <div class="item-media"><span class="iconfont i-qian size-16"></span></div>
                        <div class="item-inner">
                            <div class="item-title-row">
                                <div class="item-title">我的皓币</div>
                            </div>
                            <div class="item-subtitle">
                                <strong class="size-16"><?php echo Yii::$app->formatter->asDecimal($useraccount->amount); ?></strong> 
                                <span class="clr-lightgray size-08">元</span>
                            </div>
                        </div>
                    </li>
                    <li class="item-content">
                        <div class="item-media"><span class="iconfont i-rmb size-16"></span></div>
                        <div class="item-inner">
                            <div class="item-title-row">
                                <div class="item-title">可提现皓币</div>
                            </div>
                            <div class="item-subtitle">
                                <strong class="clr-green size-16"><?php echo Yii::$app->formatter->asDecimal($useraccount->can_drawal_amount); ?></strong> 
                                <span class="clr-lightgray size-08">元</span>
                            </div>
                        </div>
                    </li>

                    <li class="item-content">
                        <div class="item-media"><span class="iconfont i-assessedbadge size-16"></span></div>
                        <div class="item-inner">
                            <div class="item-title-row">
                                <div class="item-title">已提现皓币</div>
                            </div>
                            <div class="item-subtitle">
                                <strong class="clr-red size-16"><?php echo Yii::$app->formatter->asDecimal($useraccount->yet_drawal_amount); ?></strong> 
                                <span class="clr-lightgray size-08">元</span>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
            <div class="content-block center-block">
                <?php if ($useraccount->can_drawal_amount < MTools::getYiiParams("rebate_amount")): ?>
                    <span class="iconfont i-light clr-red size-20"></span>
                    <br/>可提现金额不足<?php echo MTools::getYiiParams("rebate_amount"); ?>元，请继续努力 
                <?php else: ?>
                    请您关注皓夜公众平台，到公众平台提现
                    <br/>
                    <span><img src="/images/qrcode.jpg"></span>
                <?php endif; ?>
            </div>
        </div>
        <div class="tab" id="tab-history">
            <div class="content-block hide no-data">
                <div class="content-block center-block">
                    <span class="iconfont i-information size-20"></span>
                    <br/>暂无提现记录
                </div>
            </div>
            <div class="list-block content-block">
                <ul>
                    <?php foreach (frontendm\models\WB_UserDrawalRecord::getList() as $item): ?>
                        <li><span class="amount">￥<?php echo Yii::$app->formatter->asDecimal($item["amount"]);?></span><span class="date pull-right"><?php echo $item["payment_time"];?></span></li>
                    <?php endforeach; ?>
                </ul>
                <p class="hide"><a id="btnLoadMore" href="#" class="button">加载更多...</a></p>
            </div>
        </div>
    </div>
</div>
<div class="popup-overlay"></div>